import requests
class TestIhrmQuid():
    @classmethod
    def Ihrm_add_emp(cls,header,json_data):
        url = "http://ihrm-test.itheima.net/api/sys/user"
        resp = requests.post(url=url, headers=header, json=json_data)
        return resp
    @classmethod
    def Ihrm_query_emp(cls,user_id,header):
        url = "http://ihrm-test.itheima.net/api/sys/user/{}".format(user_id)
        resp = requests.get(url=url, headers=header)
        return resp
    @classmethod
    def Ihrm_modify_emp(cls,user_id,header,json_data):
        url = "http://ihrm-test.itheima.net/api/sys/user/{}".format(user_id)
        resp = requests.put(url=url, headers=header, json=json_data)
        return resp
    @classmethod
    def Ihrm_delete_emp(cls,user_id,header):
        url = "http://ihrm-test.itheima.net/api/sys/user/{}".format(user_id)
        resp = requests.delete(url=url, headers=header)
        return resp
